<?php

namespace Constructor;

abstract class AbstractContainer
{
    protected $container = array();
    public function get( $identifier = NULL )
    {
        return ( isset( $this->container[$identifier] )? $this->container[$identifier] : NULL );
    }
    
    public function set( $identifier, $content ) { return ( ( bool ) $this->container[$identifier] = $content );  }
    public function has( $identifier ) { return isset( $this->container[$identifier] ); }
    public function reset() { $this->container = array(); }
    public function count() { return sizeof($this->container); }
    public function getIdentifiers() { return array_keys( $this->container ); }
}
